home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / iesdata.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  2.1 KB  |  56 lines

  1. /* Copyright (C) 1999 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: iesdata.h,v 1.2 2000/09/19 19:00:43 lpd Exp $ */
  20. /* Generic execution stack structure definition */
  21.  
  22. #ifndef iesdata_INCLUDED
  23. #  define iesdata_INCLUDED
  24.  
  25. #include "isdata.h"
  26.  
  27. /* Define the execution stack structure. */
  28. typedef struct exec_stack_s {
  29.  
  30.     ref_stack_t stack;        /* the actual execution stack */
  31.  
  32. /*
  33.  * To improve performance, we cache the currentfile pointer
  34.  * (i.e., `shallow-bind' it in Lisp terminology).  The invariant is as
  35.  * follows: either esfile points to the currentfile slot on the estack
  36.  * (i.e., the topmost slot with an executable file), or it is 0.
  37.  * To maintain the invariant, it is sufficient that whenever a routine
  38.  * pushes or pops anything on the estack, if the object *might* be
  39.  * an executable file, invoke esfile_clear_cache(); alternatively,
  40.  * immediately after pushing an object, invoke esfile_check_cache().
  41.  */
  42.     ref *current_file;
  43.  
  44. } exec_stack_t;
  45.  
  46. /*
  47.  * current_file is cleared by garbage collection, so we don't declare it
  48.  * as a pointer.
  49.  */
  50. #define public_st_exec_stack()    /* in interp.c */\
  51.   gs_public_st_suffix_add0(st_exec_stack, exec_stack_t, "exec_stack_t",\
  52.     exec_stack_enum_ptrs, exec_stack_reloc_ptrs, st_ref_stack)
  53. #define st_exec_stack_num_ptrs st_ref_stack_num_ptrs
  54.  
  55. #endif /* iesdata_INCLUDED */
  56.